3.1.5 \(\int x (a+b \text {csch}(c+d x^2)) \, dx\) [5]

Optimal. Leaf size=26 \[ \frac {a x^2}{2}-\frac {b \tanh ^{-1}\left (\cosh \left (c+d x^2\right )\right )}{2 d} \]

[Out]

1/2*a*x^2-1/2*b*arctanh(cosh(d*x^2+c))/d

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {14, 5545, 3855} \begin {gather*} \frac {a x^2}{2}-\frac {b \tanh ^{-1}\left (\cosh \left (c+d x^2\right )\right )}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*(a + b*Csch[c + d*x^2]),x]

[Out]

(a*x^2)/2 - (b*ArcTanh[Cosh[c + d*x^2]])/(2*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 5545

Int[((a_.) + Csch[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Csch[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int x \left (a+b \text {csch}\left (c+d x^2\right )\right ) \, dx &=\int \left (a x+b x \text {csch}\left (c+d x^2\right )\right ) \, dx\\ &=\frac {a x^2}{2}+b \int x \text {csch}\left (c+d x^2\right ) \, dx\\ &=\frac {a x^2}{2}+\frac {1}{2} b \text {Subst}\left (\int \text {csch}(c+d x) \, dx,x,x^2\right )\\ &=\frac {a x^2}{2}-\frac {b \tanh ^{-1}\left (\cosh \left (c+d x^2\right )\right )}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(57\) vs. \(2(26)=52\).
time = 0.03, size = 57, normalized size = 2.19 \begin {gather*} \frac {a x^2}{2}-\frac {b \log \left (\cosh \left (\frac {c}{2}+\frac {d x^2}{2}\right )\right )}{2 d}+\frac {b \log \left (\sinh \left (\frac {c}{2}+\frac {d x^2}{2}\right )\right )}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*Csch[c + d*x^2]),x]

[Out]

(a*x^2)/2 - (b*Log[Cosh[c/2 + (d*x^2)/2]])/(2*d) + (b*Log[Sinh[c/2 + (d*x^2)/2]])/(2*d)

________________________________________________________________________________________

Maple [A]
time = 0.64, size = 30, normalized size = 1.15

method result size
derivativedivides \(\frac {\left (d \,x^{2}+c \right ) a +b \ln \left (\tanh \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )\right )}{2 d}\) \(30\)
default \(\frac {\left (d \,x^{2}+c \right ) a +b \ln \left (\tanh \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )\right )}{2 d}\) \(30\)
risch \(\frac {a \,x^{2}}{2}+\frac {b \ln \left ({\mathrm e}^{d \,x^{2}+c}-1\right )}{2 d}-\frac {b \ln \left ({\mathrm e}^{d \,x^{2}+c}+1\right )}{2 d}\) \(42\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*csch(d*x^2+c)),x,method=_RETURNVERBOSE)

[Out]

1/2/d*((d*x^2+c)*a+b*ln(tanh(1/2*d*x^2+1/2*c)))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 25, normalized size = 0.96 \begin {gather*} \frac {1}{2} \, a x^{2} + \frac {b \log \left (\tanh \left (\frac {1}{2} \, d x^{2} + \frac {1}{2} \, c\right )\right )}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*csch(d*x^2+c)),x, algorithm="maxima")

[Out]

1/2*a*x^2 + 1/2*b*log(tanh(1/2*d*x^2 + 1/2*c))/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 55 vs. \(2 (22) = 44\).
time = 0.38, size = 55, normalized size = 2.12 \begin {gather*} \frac {a d x^{2} - b \log \left (\cosh \left (d x^{2} + c\right ) + \sinh \left (d x^{2} + c\right ) + 1\right ) + b \log \left (\cosh \left (d x^{2} + c\right ) + \sinh \left (d x^{2} + c\right ) - 1\right )}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*csch(d*x^2+c)),x, algorithm="fricas")

[Out]

1/2*(a*d*x^2 - b*log(cosh(d*x^2 + c) + sinh(d*x^2 + c) + 1) + b*log(cosh(d*x^2 + c) + sinh(d*x^2 + c) - 1))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \left (a + b \operatorname {csch}{\left (c + d x^{2} \right )}\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*csch(d*x**2+c)),x)

[Out]

Integral(x*(a + b*csch(c + d*x**2)), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 49 vs. \(2 (22) = 44\).
time = 0.41, size = 49, normalized size = 1.88 \begin {gather*} \frac {{\left (d x^{2} + c\right )} a}{2 \, d} - \frac {b \log \left (e^{\left (d x^{2} + c\right )} + 1\right )}{2 \, d} + \frac {b \log \left ({\left | e^{\left (d x^{2} + c\right )} - 1 \right |}\right )}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*csch(d*x^2+c)),x, algorithm="giac")

[Out]

1/2*(d*x^2 + c)*a/d - 1/2*b*log(e^(d*x^2 + c) + 1)/d + 1/2*b*log(abs(e^(d*x^2 + c) - 1))/d

________________________________________________________________________________________

Mupad [B]
time = 0.12, size = 47, normalized size = 1.81 \begin {gather*} \frac {a\,x^2}{2}-\frac {\mathrm {atan}\left (\frac {b\,{\mathrm {e}}^{d\,x^2}\,{\mathrm {e}}^c\,\sqrt {-d^2}}{d\,\sqrt {b^2}}\right )\,\sqrt {b^2}}{\sqrt {-d^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b/sinh(c + d*x^2)),x)

[Out]

(a*x^2)/2 - (atan((b*exp(d*x^2)*exp(c)*(-d^2)^(1/2))/(d*(b^2)^(1/2)))*(b^2)^(1/2))/(-d^2)^(1/2)

________________________________________________________________________________________